<?php
namespace app\portal\model;
use think\Model;

class CommentModel extends Model
{

    //获取话题的主题
    public function getcommentinfo($where)
    {
        return $this->where($where)->select();
    }

    //获取评论
    public function getmanycommet($parent_id)
    {
        return $this->where($parent_id)->count();
    }

    //获取用户
    public function getuserinfos()
    {
        return $this->hasOne('ImsMemberModel', 'id', 'user_id')->field('staff_number,id');
    }


}
